Skip to content

Nn descent/fused wmma arena - #1

Closed
sherylll wants to merge 4 commits into
maxwbuckley:nn-descent/fused-wmma-joinfrom
sherylll:nn-descent/fused-wmma-arena
Closed

sherylll wants to merge 4 commits into
maxwbuckley:nn-descent/fused-wmma-joinfrom
sherylll:nn-descent/fused-wmma-arena

Conversation

@sherylll

Copy link
Copy Markdown

No description provided.

Write new/new and new/old distances after the final feature-loop barrier,
then reuse the stored matrices during metric conversion and graph insertion.
Both accumulator lifetimes end before the epilogues.

SMEM capacity review covered sm_80, sm_86, sm_90, sm_100, sm_103, sm_107,
and sm_120 from the architecture matrix, plus the CUDA-table capacity
classes sm_70/75/87/89/110/12.x. Two 64x68 float distance matrices reuse
the two 64x136 half vector tiles: both occupy 34,816 bytes. The SMEM
residency ceiling is unchanged on these architectures; this is capacity
analysis, not an architecture-wide register or performance validation.
SMEM-only block ceilings stay at 2 on sm_70; 1 on sm_75; 4 on sm_80/87;
2 on sm_86/89/12.x; 6 on sm_90/100/103/110; and 6 on sm_107 (9 with
its oversized 328-KiB opt-in). Thread/register limits may be lower.

Measured on H100 (sm_90), CUDA 13.3.73, Falcon 1M x 1024 FP32 input with
FP16 WMMA, graph degree 64/intermediate 128, 20 iterations, 16 OpenMP
threads. Three cooled trials per configuration:
  Original unfused + bound 4 (485ffcf): join 3.805831s, build 6.712011s.
  Fused loops + bound 4 + arena:         join 3.164726s, build 6.063527s.
This reduces join time 16.8% and GNND build time 9.7%; join time is included
in build time. Baselines came from separate three-trial batches with
brief thermal flags, so these are indicative, not fixed-clock timings.

Against the existing fused/bound-4 kernel, static spill stores/loads fall
from 148/104 to 112/84 bytes; registers stay at 32/thread, shared memory
at 35,344 bytes/block, and predicted residency at four blocks/SM.

Validation of this identical kernel body: sm_90 compilation, memcheck and
racecheck at both bounds 4/off on 256 Falcon rows for two iterations,
and full Falcon sampled recall around 95% with no invalid sampled IDs.
Other architectures were reviewed for SMEM capacity only. No V100 runtime
or achieved-occupancy claim is made.
@maxwbuckley

Copy link
Copy Markdown
Owner

Thanks! Cherry-picked onto NVIDIA#2835 as a6e32fc, c1aed5d and fdef40d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants